﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Electrical;
using YArchitech.Revit;
using YArchitech.Revit.Electric.Common;

namespace Model
{
	public class Common
	{
		public static void AddCableTrayParam(Document doc, CableTray cableTray)
		{
			Dictionary<string, ParameterType> dictionary = new Dictionary<string, ParameterType>();
            dictionary.Add("编号", (ParameterType)1);
			foreach (KeyValuePair<string, ParameterType> keyValuePair in dictionary)
			{
				if (cableTray.GetParameter(keyValuePair.Key) == null)
				{
					SharedParameter.InsertSharedParameter(doc, BuiltInCategory.OST_CableTray, "电气数据", dictionary, true);
					break;
				}
			}
		}
	}
}
